<html>
<body>
<?php ob_start() ?>
<img src="../graficas/barras.php" name="Grafica" id="Grafica" />
<?php
        $contents = ob_get_contents();
        $filenamePNG = "barras.png";
        $handle = fopen($filenamePNG, 'w+'); 
        @fwrite($handle, $contents);  
        fclose($handle);
        ob_end_clean();
?>
<?php ob_start() ?>
<img src="../graficas/barrasPromedio.php" name="Grafica" id="Grafica" />
<?php
        $contents = ob_get_contents();
        $filenamePNG = "barrasP.png";
        $handle = fopen($filenamePNG, 'w+'); 
        @fwrite($handle, $contents);  
        fclose($handle);
        ob_end_clean();
?>
</body>
</html> 